// import request from '@/utils/request';
// export async function fakeAccountLogin(params) {
//   return request('/api/login/account', {
//     method: 'POST',
//     data: params,
//   });
// }
// export async function getFakeCaptcha(mobile) {
//   return request(`/api/login/captcha?mobile=${mobile}`);
// }


import request from '@/utils/request';
import Base64 from 'crypto-js/enc-base64';
import Utf8 from 'crypto-js/enc-utf8';
// import md5 from 'js-md5';
// import React from "react";

export async function login(params) {
  params.password = Base64.stringify(Utf8.parse(params.password));
  return request(`/login/`, {
    method: 'POST',
    data: params,
  });
}

export async function register(params) {
  return request(`/register/`, {
    method: 'POST',
    data: params,
  });
}
